#ifndef WORKCHECK_H
#define WORKCHECK_H

#include <QWidget>
#include <QDateTime>
#include <QTimer>
#include <opencv2\opencv.hpp>
#include "config.h"
#include <dlib/opencv.h>
#include <dlib/image_processing.h>
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing/shape_predictor.h>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QDebug>
#include <QSqlError>


namespace Ui {
class workCheck;
}

class workCheck : public QWidget
{
    Q_OBJECT

public:
    explicit workCheck(QWidget *parent = nullptr);
    ~workCheck();

signals:
    void back();
    void compare();

private slots:
    void on_begin_clicked();

    void showTime();

    void on_stop_clicked();

    void on_back_clicked();

    void compare_face();

private:
    Ui::workCheck *ui;
    bool stop = false;
    void check_duplicate(QString name, QString id);
    void add_card(QString name, QString id);
};

#endif // WORKCHECK_H
